var app={
  androidUrl:'https://www.uaf.com.cn/DZD.apk',
  iphoneUrl:'https://itunes.apple.com/cn/app/id1219129036?mt=8',
  weixinUrl:'http://a.app.qq.com/o/simple.jsp?pkgname=com.uadzd&from=singlemessage',
  download:function(){
    //微信
    if(this.isWeixin()){           
      if(navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)){
        window.location = this.iphoneUrl;
      }else{
        window.location = this.weixinUrl;
      }
    }else{//非微信浏览器
      if(navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)){
        window.location = this.iphoneUrl;
      }else{
        window.location=this.androidUrl;//android下载地址
      }
    }
  },
  isWeixin:function(){ //判断是否是微信
    var ua = navigator.userAgent.toLowerCase();
    return (ua.match(/MicroMessenger/i) == "micromessenger")
  }
};